package com.szrt.java.day20161229.demo05;


import org.junit.Test;

public class CarTest {

	
	@Test
	public void work() {
		
		//1 new 1个对象
		Car car  = new Car(200000,"雷克萨斯");
		//2 打印
		// 2.1 给对象生成1个toString
		// 2.2 直接打印这个对象就行
		System.out.println(car);
	}
	
	
	@Test
	public void youcanshu() {
		
		//1 new 1个对象
		Car car  = new Car(200000,"雷克萨斯");
		//2 打印
		System.out.println(car.getBrand());
		System.out.println(car.getPrice());
	}
	
	/*@Test
	public void wucanshu() {
		
		//1 new 1个对象
		
		Car car  = new Car();
		
		//2 给对象赋值
		
		car.setPrice(100000);
		car.setBrand("byd");
		
		//3 打印
		System.out.println(car.getBrand());
	}*/

}
